# -*- coding: utf-8 -*-

# To change this template, choose Tools | Templates
# and open the template in the editor.

__author__="Eagle"
__date__ ="$28.2.2011 23:09:40$"

import wx

from wireframe import MyFrame1

app = wx.App(False)
frame = MyFrame1(None)
frame.Show(True)

root = frame.m_treeCtrl4.AddRoot("_root_")
cat = frame.m_treeCtrl4.AppendItem(root, u"Kategorie 1")
frame.m_treeCtrl4.AppendItem(cat, u"Podkategorie 1")
frame.m_treeCtrl4.AppendItem(cat, u"Podkategorie 2")
cat = frame.m_treeCtrl4.AppendItem(root, u"Kategorie 2")

frame.m_listCtrl2.InsertColumn(0, u"Jméno")
frame.m_listCtrl2.InsertColumn(1, u"Poznámky")

index = frame.m_listCtrl2.InsertStringItem(0, u"První publikace")
frame.m_listCtrl2.SetStringItem(index, 1, "3")

index = frame.m_listCtrl2.InsertStringItem(0, u"Druhá publikace")
frame.m_listCtrl2.SetStringItem(index, 1, "7")

index = frame.m_listCtrl2.InsertStringItem(0, u"Třetí publikace")
frame.m_listCtrl2.SetStringItem(index, 1, "0")

frame.m_listCtrl2.SetColumnWidth(0, wx.LIST_AUTOSIZE)

root = frame.m_treeCtrl5.AddRoot("_root_")
cat = frame.m_treeCtrl5.AppendItem(root, u"Kategorie 1")
frame.m_treeCtrl5.AppendItem(cat, u"Podkategorie 1")
frame.m_treeCtrl5.AppendItem(cat, u"Podkategorie 2")
cat = frame.m_treeCtrl5.AppendItem(root, u"Kategorie 2")


frame.m_listCtrl3.InsertColumn(0, u"Autor")
frame.m_listCtrl3.InsertColumn(1, u"Text")

index = frame.m_listCtrl3.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl3.SetStringItem(index, 1, u"Má první poznámka")

index = frame.m_listCtrl3.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl3.SetStringItem(index, 1, u"Má druhá poznámka")

index = frame.m_listCtrl3.InsertStringItem(0, u"Josef Dubák")
frame.m_listCtrl3.SetStringItem(index, 1, u"Cizí poznámka")

frame.m_listCtrl3.SetColumnWidth(1, wx.LIST_AUTOSIZE)


frame.m_listCtrl4.InsertColumn(0, u"Autor")
frame.m_listCtrl4.InsertColumn(1, u"Text")

index = frame.m_listCtrl4.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl4.SetStringItem(index, 1, u"Má první poznámka")

index = frame.m_listCtrl4.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl4.SetStringItem(index, 1, u"Má druhá poznámka")

index = frame.m_listCtrl4.InsertStringItem(0, u"Josef Dubák")
frame.m_listCtrl4.SetStringItem(index, 1, u"Cizí poznámka")

frame.m_listCtrl4.SetColumnWidth(1, wx.LIST_AUTOSIZE)

frame.m_richText1.WriteText(u"Ukázkový komentář obsahující písmo ")
frame.m_richText1.BeginBold()
frame.m_richText1.WriteText(u"tučné, ")
frame.m_richText1.EndBold()

frame.m_richText1.BeginItalic()
frame.m_richText1.WriteText(u"kurzívu")
frame.m_richText1.EndItalic()

frame.m_richText1.WriteText(u" a ")

frame.m_richText1.BeginUnderline()
frame.m_richText1.WriteText(u"podtržené")
frame.m_richText1.EndUnderline()

frame.m_richText1.Newline()

frame.m_richText1.WriteText(u"Odkaz by mohl vypadat asi ")
urlStyle = wx.richtext.TextAttrEx()
urlStyle.SetTextColour(wx.BLUE)
urlStyle.SetFontUnderlined(True)
frame.m_richText1.BeginStyle(urlStyle)
frame.m_richText1.BeginURL("kod_knihy")
frame.m_richText1.WriteText(u"takto")
frame.m_richText1.EndURL()
frame.m_richText1.EndStyle()

root = frame.m_treeCtrl3.AddRoot("_root_")
cat = frame.m_treeCtrl3.AppendItem(root, u"Kategorie 1")
frame.m_treeCtrl3.AppendItem(cat, u"Podkategorie 1")
frame.m_treeCtrl3.AppendItem(cat, u"Podkategorie 2")
cat = frame.m_treeCtrl3.AppendItem(root, u"Kategorie 2")

frame.m_listCtrl6.InsertColumn(0, u"Jméno")
frame.m_listCtrl6.InsertColumn(1, u"Poznámky")

index = frame.m_listCtrl6.InsertStringItem(0, u"První publikace")
frame.m_listCtrl6.SetStringItem(index, 1, "3")

index = frame.m_listCtrl6.InsertStringItem(0, u"Druhá publikace")
frame.m_listCtrl6.SetStringItem(index, 1, "7")

index = frame.m_listCtrl6.InsertStringItem(0, u"Třetí publikace")
frame.m_listCtrl6.SetStringItem(index, 1, "0")

frame.m_listCtrl6.SetColumnWidth(0, wx.LIST_AUTOSIZE)


frame.m_listCtrl7.InsertColumn(0, u"Jméno")
frame.m_listCtrl7.InsertColumn(1, u"Práva")

index = frame.m_listCtrl7.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl7.SetStringItem(index, 1, u"Číst")

index = frame.m_listCtrl7.InsertStringItem(0, u"Josef Dubák")
frame.m_listCtrl7.SetStringItem(index, 1, u"Upravovat")

index = frame.m_listCtrl7.InsertStringItem(0, u"Josef Hlupák")
frame.m_listCtrl7.SetStringItem(index, 1, u"Číst")

frame.m_listCtrl7.SetColumnWidth(0, wx.LIST_AUTOSIZE)
frame.m_listCtrl7.SetColumnWidth(1, wx.LIST_AUTOSIZE)

frame.m_listCtrl5.InsertColumn(0, u"Datum")
frame.m_listCtrl5.InsertColumn(1, u"Autor")
frame.m_listCtrl5.InsertColumn(3, u"Změna")

index = frame.m_listCtrl5.InsertStringItem(0, u"01.02.11")
frame.m_listCtrl5.SetStringItem(index, 1, u"Josef Novák")
frame.m_listCtrl5.SetStringItem(index, 2, u"Poznámka vytvořena")

index = frame.m_listCtrl5.InsertStringItem(0, u"15.02.11")
frame.m_listCtrl5.SetStringItem(index, 1, u"Josef Novák")
frame.m_listCtrl5.SetStringItem(index, 2, u"Poznámka upravena")

index = frame.m_listCtrl5.InsertStringItem(0, u"16.02.11")
frame.m_listCtrl5.SetStringItem(index, 1, u"Josef Dubák")
frame.m_listCtrl5.SetStringItem(index, 2, u"Poznámka upravena")

frame.m_listCtrl5.SetColumnWidth(0, wx.LIST_AUTOSIZE)
frame.m_listCtrl5.SetColumnWidth(1, wx.LIST_AUTOSIZE)
frame.m_listCtrl5.SetColumnWidth(2, wx.LIST_AUTOSIZE)

frame.m_listCtrl71.InsertColumn(0, u"Autor")
frame.m_listCtrl71.InsertColumn(1, u"Text")

index = frame.m_listCtrl71.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl71.SetStringItem(index, 1, u"Má první poznámka")

index = frame.m_listCtrl71.InsertStringItem(0, u"Josef Novák")
frame.m_listCtrl71.SetStringItem(index, 1, u"Má druhá poznámka")

index = frame.m_listCtrl71.InsertStringItem(0, u"Josef Dubák")
frame.m_listCtrl71.SetStringItem(index, 1, u"Cizí poznámka")

frame.m_listCtrl71.SetColumnWidth(1, wx.LIST_AUTOSIZE)


app.MainLoop()